package com.lingxu.module.result.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.lingxu.module.result.entity.ApprovalParams;
import com.lingxu.module.result.entity.ModelFeed;
import com.lingxu.module.result.entity.ResultFeedback;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
 * @Title: ResultFeedbackMapper
 * @Package: com.lingxu.module.result.mapper
 * @Author: ysj闫世杰
 * @Email: 1105324813@qq.com
 * @Date: Created in 2023/12/7 9:17
 * @Description:
 * @Version: 1.0.0
 */
@Mapper
public interface ResultFeedbackMapper extends BaseMapper<ResultFeedback> {

    /**
     * @Author ysj闫世杰
     * @Description 查询需要审批成效反馈记录的模型
     * @Date 2023/12/7 9:41
     * @Param: feedPage
     * @Param: status
     * @return com.baomidou.mybatisplus.core.metadata.IPage<com.lingxu.module.result.entity.ModelFeed>
     **/
    IPage<ModelFeed> findModelFeedBackList(@Param("feedPage") Page<ModelFeed> feedPage, @Param("status") String status,
                                           @Param("keyWord") String keyWord);

    /**
     * @Author ysj闫世杰
     * @Description 查询待审批的成效反馈列表
     * @Date 2023/12/7 10:30
     * @Param: feedbackPage
     * @Param: status
     * @Param: modelId
     * @return com.lingxu.base.common.api.vo.Result
     **/
    IPage<ResultFeedback> findNeedApproval(@Param("feedbackPage") Page<ResultFeedback> feedbackPage, @Param("status") String status,
                                           @Param("modelId") String modelId,@Param("types") String types);

    /**
     * @Author ysj闫世杰
     * @Description 审批批量
     * @Date 2023/12/7 16:22
     * @Param: params
     * @return int
     **/
    int updateApproval(@Param("params") ApprovalParams params);

    /**
     * @Author ysj闫世杰
     * @Description 待审批模型数量
     * @Date 2023/12/18 15:10
     * @Param:
     * @return int
     **/
    int findNeedApprovalCount();
}
